package com.itlong.cloud.common.network.tcp.mina;

import com.itlong.cloud.enumerate.ecode.AppErrorCodeEnum;
import com.itlong.cloud.enumerate.oldapp.Code;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * <desc>
 *      mina业务处理暴露接口
 * </desc>
 *
 * @createDate 2017/12/07
 */
@FeignClient(name = "common-service")
public interface IMinaServiceClient {
    /**
     * <desc>
     *      发送消息到客户端
     * </desc>
     *
     * @param key
     * @param message 发送的消息
     * @return
     * @author Jiaqi.X
     * @createDate 2017/12/07
     */
    @RequestMapping(path = "/network/mina/sendMessage")
    AppErrorCodeEnum sendMessage(@RequestParam("key") String key,@RequestParam("message") String message);

    /**
     * <desc>
     *     旧版APP_远程开门发送消息到一卡通
     * </desc>
     *
     * @param key
     * @param message 发送的消息
     * @return
     * @author Jiaqi.X
     * @createDate 2017/12/07
     */
    @RequestMapping(path = "/network/mina/oldSendMessage",method = {RequestMethod.POST})
    Code oldSendMessage(@RequestParam("key") String key,@RequestParam("message") String message);


}
